package user;

import book.BookList;
import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
import operation.*;
import sun.security.krb5.SCDynamicStoreConfig;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-05-19
 * Time:21:13
 */
public class Admin extends user{

    public Admin(String name) {
        this.name=name;
        this.iOperations=new IOperation[]{
                new ExitOperation(),
                new FindOperation(),
                new AddOperation(),
                new DelOperation(),
                new DisplayOperation()
                };
    }


    @Override
    public int menu() {
        System.out.println("请输入需要进行的操作->");
        System.out.println("1、查找图书");
        System.out.println("2、增加图书");
        System.out.println("3、删除图书");
        System.out.println("4、显示所有图书");
        System.out.println("0、退出系统");
        System.out.println("请输入选择");
        Scanner scanner=new Scanner(System.in);
        int choice= scanner.nextInt();
        return choice;
    }
}
